package com.ozo.easy.common.batch.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ozo.easy.common.batch.mapper.BatchMapper;
import lombok.RequiredArgsConstructor;

import java.util.List;

/**
 * 批量处理service实现
 *
 * @author ozo
 * @date 2024-12-27
 */
@RequiredArgsConstructor
public class BatchServiceImpl<M extends BatchMapper<T>, T> extends ServiceImpl<M, T> implements BatchService<T> {

    protected final M batchMapper;

    @Override
    public int saveBatch(List<T> list) {
        return batchMapper.insertBatchSomeColumn(list);
    }

}
